/*
 * driverMessage.java
 *
 * Created on May 19, 2005, 10:37 AM
 */

package aa.drivers;

import aa.core.*;
import aa.gui.View;

/**
 *
 * @author  xinghuizhao
 */
public class driverMessage {
    
    /** Creates a new instance of driverMessage */
    public driverMessage() {
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        
        Integer iPort = new Integer(8070);
        
        View myView = new View(iPort);
        
        Platform myPlatform = new Platform(myView,iPort);
        
        myPlatform.start();
        
        Object[] objaAgs = new Object[0];
        
        CyberOrg cyb = (CyberOrg)myPlatform.createCyberOrg(new Long(1000),new Long(1000),new Long(1000),"aa.core.FacilitatorActor",objaAgs);
        
        
        
        
        
        ActorName actorReceiver = myPlatform.createActor(cyb.getFacilitator(), "aa.drivers.receiver", objaAgs);
        
        ActorName actorSender = myPlatform.createActor(cyb.getFacilitator(), "aa.drivers.sender", objaAgs);
        
        Object[] objaAgsTest = {actorReceiver};
        
        ActorMessage amMsg = new ActorMessage(cyb.getFacilitator(),
                                              actorSender,
                                              "sendtoyou", 
                                              objaAgsTest,
                                              false);
        
        //System.out.println(amMsg);
        
        myPlatform.sendMessage(amMsg);
       
        System.out.println("send over!");
        
    }
    
}
